package nc.ui.arap.tradisc;

import nc.bs.framework.common.NCLocator;
import nc.itf.uap.bbd.func.IFuncRegisterQueryService;
import nc.ui.pub.bill.BillCardPanel;
import nc.vo.arap.bastradisc.BasDiscVO;
import nc.vo.pub.BusinessException;
import nc.vo.uif2.LoginContext;

public class PubTool {

	public static void initTransType(LoginContext context, BillCardPanel panel) {
		IFuncRegisterQueryService service = (IFuncRegisterQueryService)NCLocator.getInstance().lookup(IFuncRegisterQueryService.class);
	    try {
			String[][] params = service.queryParameter(context.getNodeCode());
			
			if(params != null && params.length >0) {
				for(String[] param : params) {
					if("transtype".equals(param[0])) {
						panel.setHeadItem(BasDiscVO.TRANSTYPE, param[1]); 
					}else if("pk_transtype".equals(param[0])) {
						panel.setHeadItem(BasDiscVO.TRANSTYPEPK, param[1]); 
					}
				}
			}
			
		} catch (BusinessException e1) {
			e1.printStackTrace();
		}
	}
	
	
}
